package configure.service.impl;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import bean.Entity;
import configure.dao.EntityDAO;
import configure.service.EntityService;

public class EntityServiceImpl implements EntityService {
    @Autowired
    @Qualifier(value = "entityDAO")
    // 以上两个注解的作用等价于@Resource(name = "entityDAO")
    private EntityDAO entityDAO;

    @Override
    public Set<Entity> query() {
        return entityDAO.selectEntities();
    }
}
